/**
 * @description 全局搜索 (layout头部index/header、home首页有)
 */
import { Input, Select } from 'antd';
import { useState } from 'react';

const options = [
  {
    value: "1",
    label: "小说名称是"
  },
  {
    value: "2",
    label: "作者"
  },
]

function GlobalSearch({ className, animateClass = '' }) {
  const [actId, setActId] = useState('1')


  return (
    <div className={`${className} animate__${animateClass}`}>
      <Input.Search
        placeholder="全局搜索"
        allowClear
        enterButton="搜索"
        addonBefore={
          <Select value={actId} options={options} onChange={(newId) => setActId(newId)} className='select-wrapper'></Select>
        }
      />
    </div>

  )
}


export default GlobalSearch
